package com.example.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.domain.DTO.ProvinceHot;
import com.example.demo.domain.ProvinceInfo;
import com.example.demo.domain.ProvincePointCity;
import com.example.demo.service.ProvinceInfoService;
import com.example.demo.mapper.ProvinceInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author z'z'w
 * @description 针对表【PROVINCE_INFO】的数据库操作Service实现
 * @createDate 2023-05-17 15:17:12
 */
@Service
public class ProvinceInfoServiceImpl implements ProvinceInfoService {

    @Autowired
    private ProvinceInfoMapper provinceInfoMapper;

    /**
     * 热门城市
     *
     * @return
     */
    @Override
    public List<ProvinceHot> selectProvinceHot() {
        return provinceInfoMapper.selectProvinceHot();
    }

    @Override
    public List<ProvinceInfo> selectProvinceInfo() {
        return provinceInfoMapper.selectProvinceInfo();
    }

    /**
     * 返回指定省份的所有城市
     */
    @Override
    public List<ProvincePointCity> selectProvincePointCity(String provinceName) {
        return provinceInfoMapper.selectProvincePointCity(provinceName);
    }
}




